<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:body>
        <ui:composition template="/WEB-INF/jsf2/templates/templateBasic.xhtml">
            <ui:define name="top">
                <ui:include src="/WEB-INF/jsf2/templates/templateNavigation.xhtml"/>
            </ui:define>
            <ui:define name="bottom">
                <ui:include src="/WEB-INF/jsf2/templates/templateBottom.xhtml"/>
            </ui:define>

            <ui:define name="content">
                <f:loadBundle basename="com.gq2.multilang.bet" var="txt_bet"/>
                <f:loadBundle basename="com.gq2.multilang.score" var="txt_sco"/>
                <f:loadBundle basename="com.gq2.multilang.granq" var="txt_com"/>

		<h:form id="form1">
		    <h3>
			<h:outputLabel for="pagetitle" id="pagetitlelabel" styleClass="page-title">
			    <h:outputText id="pagetitle" value="#{txt_bet.colPageTitle}"/>
			</h:outputLabel>
		    </h3>
		    <table>
			<tbody>
			    <tr>
				<td>
				    <h:outputLabel for="textseason" id="textseasonlabel">
					<h:outputText id="textseason" value="#{txt_com.season}"/>
				    </h:outputLabel>
				    <h:inputText id="season" maxlength="4" size="4" value="#{columns.betSeason}" >
				    </h:inputText>
				    <h:outputLabel for="textround" id="textroundlabel" >
					<h:outputText id="textround" value="#{txt_com.Round}"/>
				    </h:outputLabel>
				    <h:inputText id="round" maxlength="2" size="2" value="#{columns.betOrderNumber}">
				    </h:inputText>
				    <h:outputLabel for="textdescription" id="textdescriptionlabel" >
					<h:outputText id="textdescription" value="#{txt_com.description}"/>
				    </h:outputLabel>
				    <h:inputText id="description" maxlength="40" value="#{columns.betDescription}">
				    </h:inputText>
				</td>
			    </tr>
			    <tr>
				<td valign="top">
				    <h:commandButton action="cancel" id="button1" value="#{txt_com.Cancel}"/>
				    <h:commandButton action="#{columns.showBets}" id="button2" value="#{txt_bet.betShow}"/>
				    <h:commandButton action="#{columns.showCols}" id="button6" value="#{txt_bet.colShow}"/>
				    <br></br>
				    <br></br>
				</td>
			    </tr>
			    <tr>
				<td>
				    <table>
					<tr>
					    <td valign="top">
						<h:dataTable columnClasses="col-center,col-center,col-center,col-left"
							     headerClass="list-header" id="dataTable1"
							     rowClasses="list-row-even,list-row-odd"
							     value="#{columns.betList}" var="currentRow">
						    <h:column id="column2">
							<f:facet name="header" >
							    <h:outputText id="outputText4" value="#{txt_com.ID}"/>
							</f:facet>
							<h:commandLink value="#{currentRow.betId}" action="#{columns.editBet}" >
							    <f:setPropertyActionListener target="#{columns.betForEdition}" value="#{currentRow}" />
							</h:commandLink>
						    </h:column>
						    <h:column id="column3">
							<h:outputText id="outputText5" value="#{currentRow['betSeason']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText6" value="#{txt_com.season}"/>
							</f:facet>
						    </h:column>
						    <h:column id="column4">
							<h:outputText  id="outputText7" value="#{currentRow['betOrderNumber']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText8" value="#{txt_com.Round}"/>
							</f:facet>
						    </h:column>
						    <h:column id="column5">
							<h:outputText id="outputText9" value="#{currentRow['betDescription']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText10" value="#{txt_com.description}"/>
							</f:facet>
						    </h:column>
						</h:dataTable>
					    </td>
					    <td>
						<br></br>
					    </td>
					    <td valign="top">
						<h:dataTable columnClasses="col-left,col-left,col-center,
							     col-center,col-center,col-center,col-center,col-center"
							     headerClass="list-header" id="dataTableBetLines"
							     rowClasses="list-row-even,list-row-odd"
							     value="#{columns.dataBetLines}" var="currentBetLine">
						    <h:column  id="column201">
							<h:outputText id="outputText201" value="#{currentBetLine['bliTeamName1']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText202" value="#{txt_sco.homeTeam}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column202">
							<h:outputText id="outputText203" value="#{currentBetLine['bliTeamName2']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText204" value="#{txt_sco.outTeam}"/>
							</f:facet>
						    </h:column>
						    <h:column id="column203">
							<h:inputText id="inputText205" size="3" maxlength="3" disabled="true" value="#{currentBetLine['bliColumnBase']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText206" value="#{txt_bet.bliColBase}"/>
							</f:facet>
						    </h:column>
						    <h:column id="column204">
							<h:inputText id="inputText207" size="1" maxlength="1" value="#{currentBetLine['bliSign']}"/>
							<f:facet name="header">
							    <h:outputText id="outputText208" value="#{txt_bet.bliSign}"/>
							</f:facet>
						    </h:column>
						</h:dataTable>
						<br></br>
						<br></br>
						<h:outputLabel for="outputText222" id="outputText222label">
						    <h:outputText id="outputText222" value="#{txt_bet.savedReductions}"/>
						</h:outputLabel>
						<br></br>
						<h:selectOneMenu id="select221" value="#{columns.siCol}">
						    <f:selectItems id="selitems221"  value="#{columns.columnItemList}" />
						</h:selectOneMenu>
						<h:commandButton action="#{columns.restoreReduction}" id="button221" value="#{txt_bet.restoreReduction}"/>
						<br></br>
						<br></br>
						<h:outputLabel for="outputText211" id="outputText211label">
						    <h:outputText id="outputText211" value="#{txt_bet.reductions}"/>
						</h:outputLabel>
						<br></br>
						<h:selectOneMenu id="select201" value="#{columns.selReduction}">
						    <f:selectItems id="SelectItemsReductionTypes" value="#{columns.reductionTypeList}"
								   var="reducType"
								   itemValue="#{reducType.id}"
								   itemLabel="#{txt_bet[reducType.key]}"
								   itemDescription="#{txt_bet[reducType.key]}" />
						</h:selectOneMenu>
						<br></br>
						<br></br>
						<h:outputLabel for="outputText212" id="outputText212label">
						    <h:outputText id="outputText212" value="#{txt_bet.reduceFromCol}"/>
						</h:outputLabel>
						<br></br>
						<h:inputText id="reducefromcol" maxlength="5" size="5" value="#{columns.reduceFromCol}"/>
						<h:outputLabel for="outputText213" id="outputText213label">
						    <h:selectBooleanCheckbox id="reducerandom" value="#{columns.reduceRandom}" />
						    <h:outputText id="outputText213" value="#{txt_bet.randomF}"/>
						</h:outputLabel>
						<br></br>
						<h:outputLabel for="outputText214" id="outputText214label">
						    <h:outputText id="outputText214" value="#{txt_bet.maximumColumnsNumber}"/>
						</h:outputLabel>
						<br></br>
						<h:inputText id="maximumColumnsNumber" maxlength="5" size="5" value="#{columns.maximumColumnsNumber}"/>

						<h:commandButton action="#{columns.generateReduction}" id="button211" value="#{txt_bet.generateReduction}"/>
						<br></br>
						<br></br>
						<h:inputText id="savereduction" maxlength="20" size="20" value="#{columns.saveReduction}" />
						<h:commandButton action="#{columns.saveReduction}" id="button212" value="#{txt_bet.saveReduction}"/>

					    </td>
					    <td valign="top">
						<h:dataTable id="dataTableCols"
							     columnClasses="col-center,col-center,col-center,col-center,
							     col-center,col-center,col-center,col-center"
							     headerClass="list-header" rowClasses="list-row-even,list-row-odd"
							     value="#{columns.dataShowCols}" var="currentCol">
						    <h:column  id="column301">
							<h:inputText disabled="true" id="inputText301" size="1" value="#{currentCol.col1}"/>
							<f:facet name="header">
							    <h:outputText id="outputText301" value="#{columns.numcol1}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column302">
							<h:inputText disabled="true" id="inputText302" size="1" value="#{currentCol.col2}"/>
							<f:facet name="header">
							    <h:outputText id="outputText302" value="#{columns.numcol2}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column303">
							<h:inputText disabled="true" id="inputText303" size="1" value="#{currentCol.col3}"/>
							<f:facet name="header">
							    <h:outputText id="outputText303" value="#{columns.numcol3}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column304">
							<h:inputText disabled="true" id="inputText304" size="1" value="#{currentCol.col4}"/>
							<f:facet name="header">
							    <h:outputText id="outputText304" value="#{columns.numcol4}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column305">
							<h:inputText disabled="true" id="inputText305" size="1" value="#{currentCol.col5}"/>
							<f:facet name="header">
							    <h:outputText id="outputText305" value="#{columns.numcol5}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column306">
							<h:inputText disabled="true" id="inputText306" size="1" value="#{currentCol.col6}"/>
							<f:facet name="header">
							    <h:outputText id="outputText306" value="#{columns.numcol6}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column307">
							<h:inputText disabled="true" id="inputText307" size="1" value="#{currentCol.col7}"/>
							<f:facet name="header">
							    <h:outputText id="outputText307" value="#{columns.numcol7}"/>
							</f:facet>
						    </h:column>
						    <h:column  id="column308">
							<h:inputText disabled="true" id="inputText308" size="1" value="#{currentCol.col8}"/>
							<f:facet name="header">
							    <h:outputText id="outputText308" value="#{columns.numcol8}"/>
							</f:facet>
						    </h:column>
						</h:dataTable>
						<br></br>
						<h:outputLabel for="numcols" id="numcolslabel">
						    <h:outputText id="numcols" value="#{txt_bet.colNumCols}"/>
						</h:outputLabel>
						<h:outputFormat id="totalcolumns" value="#{columns.numCols}" />
						<br></br>
						<h:commandButton action="#{columns.movefirst}" id="button11" value="#{txt_bet.first}"/>
						<h:commandButton action="#{columns.moveprev}" id="button16" value="#{txt_bet.prev}"/>
						<h:commandButton action="#{columns.movenext}" id="button12" value="#{txt_bet.next}"/>
						<h:commandButton action="#{columns.movelast}" id="button13" value="#{txt_bet.last}"/>
						<br></br>
						<h:outputLabel for="goto" id="gotolabel">
						    <h:outputText id="goto" value="#{txt_bet.colGoTo}"/>
						</h:outputLabel>
						<h:inputText id="colgoto" required="false" maxlength="5" size="4" value="#{columns.colgoto}" >
						    <f:validateLongRange maximum="32000" minimum="1"/>
						</h:inputText>
						<h:commandButton action="#{columns.movegoto}" id="button14" value="#{txt_bet.goTo}"/>
						<br></br>
						<br></br>
						<h:commandButton action="printBetForms" value="#{txt_bet.print}" />
						<br></br>
						<br></br>
						<h:commandButton action="#{columns.dataShowHits}" value="#{txt_bet.showHitsInColumns}" />
						<ui:include src="/WEB-INF/includes/dataTables/hitsAndAwardsTable.xhtml">
						    <ui:param name="hitMap" value="#{columns.dataShowHits}"/>
						    <ui:param name="txtResource" value="#{txt_bet}"/>
						    <ui:param name="bean" value="#{columns}"/>
						</ui:include>
					    </td>
					</tr>
				    </table>
				</td>
			    </tr>
			</tbody>
		    </table>
		</h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
